<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="CloudStorage.*" %>

<%
            int size = 0;
            if (session.getAttribute("cart") != null) {
                size = ((Cart) session.getAttribute("cart")).getSize();
            }
%>

<html>
    <head>
        <title>Cloud Share-Login</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <link rel="stylesheet" type="text/css" href="style.css" />
        <link rel="SHORTCUT ICON" href="images/favicon.ico" />
        <style type="text/css">
            <!--
            #main .inside .block1 {
                text-align: left;
                clear: none;
                float: left;
                margin-left: 350px;
                height: 200px;
            }
            a:link {
                color: #F6F1F0;
                text-decoration: none;
            }
            a:visited {
                text-decoration: none;
            }
            a:hover {
                text-decoration: none;
            }
            a:active {
                text-decoration: none;
            }

            -->
        </style>
    </head>

    <body>
        <div id="header">
            <div class="inside"> <a href="#" class="logo"><img src="images/logo2.gif" alt="" width="131" height="83" /></a>
                <p class="slogan">Share on Clouds!</p>
                <div id="cart">
                    <ul>
                        <li><a href="downloadcart.jsp"><img alt="cart" src="images/cart.png">  Download Cart (<%=size%>)</a> </li>
                    </ul>
                </div>
                <a href="faq.jsp" class="rss"><img src="images/rss.jpg" alt="" width="39" height="41" /></a>
            </div>
            <div id="menu">
               <% if (session.getAttribute("status") == null) {%>
                <ul>
                    <li><a href="index.jsp"><img src="images/but_home.jpg" alt="" width="148" height="40" /></a></li>
                    <li><a href="login.jsp"><img src="images/but_login.jpg" alt="" width="147" height="40" /></a></li>
                    <li><a href="register.jsp"><img src="images/but_reg.jpg" alt="" width="146" height="40" /></a></li>
                    <li><a href="downloads.jsp"><img src="images/but_down.jpg" alt="" width="146" height="40" /></a></li>
                    <li><a href="upload.jsp"><img src="images/but_upload.jpg" alt="" width="146" height="40" /></a></li>
                    <li><a href="buy.jsp"><img src="images/but_buy.jpg" alt="" width="146" height="40" /></a></li>
                    
                </ul>
				<% } else { %>
                <ul>
                    <li><a href="index.jsp"><img src="images/but_home.jpg" alt="" width="148" height="40" /></a></li>
                    <li><a href="account.jsp"><img src="images/but_account.jpg" alt="" width="146" height="40" /></a></li>
                    <li><a href="downloads.jsp"><img src="images/but_down.jpg" alt="" width="146" height="40" /></a></li>
                    <li><a href="upload.jsp"><img src="images/but_upload.jpg" alt="" width="146" height="40" /></a></li>
                    <li><a href="buy.jsp"><img src="images/but_buy.jpg" alt="" width="146" height="40" /></a></li>
                    <li><a href="LogoutServlet"><img src="images/but_logout.jpg" alt="" width="147" height="40" /></a></li>
                </ul>
                <%}%>
                
            </div>
            <div class="headimage"><img src="images/picture.jpg" alt=""/> </div>
        </div>
        <div class="inside">

        </div>
        <div id="main">
            <div class="inside">
                <div id="blocks">
                    <div class="block1">
                        <h3>Members Area</h3>
                        <form method="post" action="LoginServlet">
                            <%
                                            if (session.getAttribute("status") != null) {%>
                            <p>You are already logged in!</p>
                            <%}
                            %>
                            <p><span>Username :
                                    <input name="username" type="text">
                                    <% if (session.getAttribute("message") != null && ((String) session.getAttribute("message")).equals("wrong username")) {%>
                                    <p>Wrong Username!</p>
                                    <%}%>
                                </span>
                                <span>Password :
                                    <input name="password" type="password">
                                    <% if (session.getAttribute("message") != null && ((String) session.getAttribute("message")).equals("wrong password")) {%>
                                    <p>Wrong Password! </p>
                                    <%}%>
                                </span>
                                <a href="forgotpassword.jsp">Forgot Password?</a>
                                <input type="image" src="images/login.png" name="submit" />
                            </p>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <div id="footer">
            <div class="inside">
                <p>Cloud Share &copy; 2010   |  Webdesign by Panoylhs &amp; Roumdic S.A.</p>
            </div>
        </div>
    </body>
</html>
